<?php
function check_logged(){
     global $_SESSION;

     if (isset ($_SESSION["logged"]) == false)
     {
        header("Location: login.php");
        die();
     }
     else
     {
        if ($_SESSION["logged"] == "")
        {
           header("Location: login.php");
           die();
        }
     }
     /*elseif (!array_key_exists($_SESSION["logged"],$USERS)) {
         header("Location: login.php");
     };*/
};
?>